<?php
// debug($comments);
$this->Paginator->options(array(
    'update' => '#commentContent',
    'evalScripts' => true
));


if (!empty($comments)){
    foreach ($comments as $comment){
        $user = $comment['User'];
        $comment = $comment['UsersVideosComment'];
        ?>

    <div>
        <h4> Posté par <?php echo $this->Display->userLink($user).' le '.$this->Date->getDisplay($comment['posted_on']);?></h4>
        <p>
            <?php echo $comment['content'];?>
        </p>
    </div>
    <?php
    }
    echo $this->Paginator->prev(' << ' . __('previous'));
    echo $this->Paginator->numbers();
    echo $this->Paginator->next(' >> ' . __('next'));
}
else{
    ?>
    <p> No comments yet, Be the first one ! </p>
<?php
}
?> 
        
        
<?php

echo $this->Js->writeBuffer();
?>